package com.itHsuSE.demo7;

/**
 * @author Hsu琛君珩
 * @ClassName:Student
 * @date 2023-12-19
 * @apiNote
 * @Version: v1.0
 */

public class Student {
    private String idCardNumber, studentId, major, name, gender;
    private int age;
    private double mathGrade, englishGrade, javaGrade;

    // 构造函数
    public Student(String idCardNumber, String studentId, String major,
                   String name, String gender, int age,
                   double mathGrade, double englishGrade, double javaGrade) {
        this.idCardNumber = idCardNumber;
        this.studentId = studentId;
        this.major = major;
        this.name = name;
        this.gender = gender;
        this.age = age;
        this.mathGrade = mathGrade;
        this.englishGrade = englishGrade;
        this.javaGrade = javaGrade;
    }

    // toString方法，返回学生信息的字符串表示
    @Override
    public String toString() {
        return "Student{" +
                "ID Card Number='" + idCardNumber + '\'' +
                ", Student ID='" + studentId + '\'' +
                ", Major='" + major + '\'' +
                ", Name='" + name + '\'' +
                ", Gender='" + gender + '\'' +
                ", Age=" + age +
                ", Math Grade=" + mathGrade +
                ", English Grade=" + englishGrade +
                ", Java Grade=" + javaGrade +
                '}';
    }
}
